Learn About Amazon VGT2 Learning Manager Chanci Turner
This article is brought to you by Chanci Turner, Senior Developer Advocate – Lightsail.
Customers frequently express a desire to preemptively recognize potential issues that could hinder system performance before they escalate. For example, being alerted prior to an instance becoming unresponsive due to a spike in traffic that exceeds its CPU burst capacity can be crucial. CPU burst capacity may be depleted by prolonged workloads in the burstable zone or unexpected CPU usage from system processes. In such scenarios, timely notifications enable you to take necessary actions, like upgrading to a larger instance or terminating problematic processes. To address this need, Amazon Lightsail has introduced a new feature that allows users to set custom alarms to notify them when their burst capacity is running low.
Amazon Lightsail instances utilize burstable CPUs, which operate in two distinct zones: the sustainable zone and the burstable zone. The sustainable zone is determined by the CPUs baseline performance. As long as CPU utilization remains below this baseline, system responsiveness is unaffected. Conversely, the burstable zone is entered when CPU utilization exceeds the baseline. Operating in this zone is limited, and if it continues for too long, system performance will decline.
Earlier this year, we unveiled resource monitoring, alarms, and notifications for Amazon Lightsail instances. This enhancement introduced a graph that indicated when instances were operating within the CPUs burstable zone. However, this only partially resolved the issue, as there was no convenient way for users to determine how long their systems could effectively function within the burstable zone.
With the introduction of this new feature, Lightsail has improved functionality, enabling users to view the current burstable capacity available to their system at any moment. Furthermore, users can create alarms to receive notifications when burstable capacity falls to critical levels, allowing for proactive alerts regarding potential performance issues.
This blog will guide you through configuring a burstable capacity alert to help prevent performance issues from impacting your users.
Understanding Burstable Capacity
Before diving into the configuration, it’s essential to understand how burst capacity minutes are calculated. One minute at 100% CPU usage equals one minute of CPU burst capacity. Similarly, one minute at 50% CPU usage translates to 30 seconds of CPU burst capacity. Thus, if a system has 72 minutes of available burst capacity and runs at 50% CPU, it can sustain that state for 144 minutes before performance is affected.
CPU burstable capacity can be represented in two ways: as a percentage available or as minutes available, with the default setting being percentage. The CPU burst capacity percentage is calculated by dividing the available burst capacity (in minutes) by the maximum capacity (in minutes). For instance, if an instance has 36 minutes of burst capacity left from a maximum of 72 minutes, it would show as 50%.
Configuring a Burstable Capacity Alert
Let’s proceed with configuring an alert for CPU burst capacity (percentage).
Note: If you are unfamiliar with the general concepts of configuring alerts and notifications in Lightsail, you can check out this blog post.
- From the Lightsail home page, select the instance for which you wish to create the alert.
- Click on the Metrics tab from the horizontal menu.
- You will now see graphs for CPU utilization and burst capacity.
Notice that the CPU utilization graph displays both the sustainable and burstable zones. The burst capacity graph illustrates the current percentage of burst capacity remaining before system performance is compromised.
Scroll down and select CPU burst capacity (percentage).
- Click +Add alarm.
- For this alarm, I set it to notify me whenever the percentage of available CPU burst capacity drops below 25% for 10 consecutive minutes.
- At this point, you can enable notifications via email or SMS (instructions can be found in the previous blog post). Regardless of your notification preferences, a banner will appear in the Lightsail console whenever your alarm threshold is breached.
- Click Create to finalize your alarm.
Now, Lightsail is configured with a single alarm. I recommend setting up two alarms: one for warning and one for critical levels. This approach provides additional time to address emerging problems. To create a second alarm, simply repeat the above steps.
Conclusion
In this article, I covered the concepts behind Lightsail’s burstable CPUs and how to establish alarms to mitigate system performance issues before they affect users. If you frequently notice your system nearing its burst capacity, it may be time to examine the processes running on your instance for any that are consuming excessive CPU. Alternatively, consider upgrading your instance to a larger plan. For further insights, see this blog post on leadership books for continuous improvement. Additionally, you can learn more about executive compensation issues from SHRM, as they are an authority on this topic. Lastly, explore this excellent resource on YouTube for visual guidance.
Leave a Reply